#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include<QMainWindow>
#include<QWidget>
#include<QPushButton>
#include<QString>
#include<QMouseEvent>
#include<QLabel>
#include<QResizeEvent>
#include<QHBoxLayout>
#include<QTimer>
#include<QWidget>
#include<QPixmap>
#include"candy.h"
#include<QPainter>
#define GAME_RATE 10;

namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    double a,b;
    int db,iniscore,delay;
    QWidget *gameWidget;
    QLabel *rmd,*score,*scorelb;
    QPushButton *startBtn,*acBtn,*dcBtn,*stopBtn;
    QTimer *timer;
    Candy drops;
    explicit MainWindow(QWidget *parent = 0);
    void resizeEvent(QResizeEvent*);
    void startgame();
    void acgame();
    void dcgame();
    void stopgame();
    void basketmove();
    void mouseMoveEvent(QMouseEvent*);
    void paintEvent(QPaintEvent *event);
    void rmdmove();
    //void timerEvent(QTimerEvent *event);
    ~MainWindow();
private:
    Ui::MainWindow *ui;
};

#endif // MAINWINDOW_H
